<table id="online_list_dg"></table>
<script>
$('#online_list_dg').datagrid({
	border:false,
	fitColumns:true,
    url:'<?php echo base_url();?>app/online_data?_='+GetRandomNum(),
    columns:[[
        {field:'user_name',title:'姓名',width:100,align:'center'},
        {field:'dept_name',title:'部门',width:100,align:'center'},
		{field:'timestamp',title:'登录时间',width:100,align:'center',
			formatter: function(value,row,index){
				return getLocalTime(value);
			}
		},
    ]],
	groupField:'dept_name',
	view: groupview,
	groupFormatter:function(value, rows){
		return value + ' - ' + rows.length + ' 人';
	}
});
</script>
